/*
 * Copyright (C) 2013 AndXmppSDK Project <hljdrl@gmail.com>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.drl.xmpp.storage.table;

import org.drl.xmpp.storage.AbstractAccountTable;
import org.drl.xmpp.storage.DataBaseManager;

import android.database.sqlite.SQLiteDatabase;

/**
 * @author hljdrl@gmail.com
 * 
 */
public final class ContactTable extends AbstractAccountTable {

	private static final class Fields implements AbstractAccountTable.Fields {

		private Fields() {
		}

		
		public static final String KEY_UID = "_UID";
		public static final String KEY_JID = "_JID";
		public static final String KEY_NAME = "_NAME";
		public static final String KEY_NICKNAME = "_NICKNAME";
		public static final String KEY_STATUS = "_STATUS";
		public static final String KEY_STATUS_CODE = "_STATUS_CODE";
		public static final String KEY_TIME = "_TIME";
		public static final String KEY_AVATOR_PHOTO_HASH = "_AVATOR_PHOTO_HASH";

	}
	public static final String TABLE_NAME = "_CONTACT";
	public static final String KEYS[] = { Fields._ID, Fields.KEY_UID,
			Fields.KEY_JID, Fields.KEY_NAME, Fields.KEY_NICKNAME,
			Fields.KEY_AVATOR_PHOTO_HASH, Fields.KEY_TIME ,Fields.KEY_STATUS,Fields.KEY_STATUS_CODE};
	
	private final DataBaseManager databaseManager;

	private final static ContactTable instance;

	static {
		instance = new ContactTable(DataBaseManager.getInstance());
	}

	public static ContactTable getInstance() {
		return instance;
	}

	public ContactTable(DataBaseManager databaseManager) {
		this.databaseManager = databaseManager;
	}

	@Override
	public void create(SQLiteDatabase db) {
		// TODO Auto-generated method stub

	}
	public void onUpdataContactItemAsPhotoHash(String jid,String hash)
	{
		
	}
	@Override
	protected String getTableName() {
		return TABLE_NAME;
	}

	@Override
	protected String[] getProjection() {
		return KEYS;
	}

}
